From f5e5f70252f5161817499657beaf947066cfdb8d Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 23 Jun 2009 03:02:21 +0000 Subject: [PATCH] Add 'erase_only' option to dg-100. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@3667 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/dg-100.c | 7 +++++++ gpsbabel/xmldoc/formats/dg-100.xml | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/gpsbabel/dg-100.c b/gpsbabel/dg-100.c index 78e50be58..5cc616ce1 100644 --- a/gpsbabel/dg-100.c +++ b/gpsbabel/dg-100.c @@ -619,11 +619,14 @@ dg100_erase() /* GPSBabel integration */ static char *erase; +static char *erase_only; static arglist_t dg100_args[] = { { "erase", &erase, "Erase device data after download", "0", ARGTYPE_BOOL, ARG_NOMINMAX }, + { "erase_only", &erase_only, "Only erase device data, do not download anything", + "0", ARGTYPE_BOOL, ARG_NOMINMAX }, ARG_TERMINATOR }; @@ -655,6 +658,10 @@ dg100_rd_deinit(void) static void dg100_read(void) { + if (*erase_only == '1') { + dg100_erase(); + return; + } dg100_getfiles(); if (*erase == '1') { dg100_erase(); diff --git a/gpsbabel/xmldoc/formats/dg-100.xml b/gpsbabel/xmldoc/formats/dg-100.xml index 35b95bb62..cc7b6fc7b 100644 --- a/gpsbabel/xmldoc/formats/dg-100.xml +++ b/gpsbabel/xmldoc/formats/dg-100.xml @@ -7,6 +7,10 @@ Command showing DG-100 download and erase on Linux gpsbabel -t -i dg-100,erase -o gpx /dev/ttyUSB0 outputfile.gpx + + Command showing DG-100 erase_only option on Linux + gpsbabel -t -i dg-100,erase_only /dev/ttyUSB0 + The DG-100 provides a physical USB interface to the host computer, but -- 2.30.2